package net.dopan.pigframe.demo.socket;

import java.util.Date;

import net.dopan.pigframe.HomepageServerApplication;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class HelloSender1 {

    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send(String msg) {
        String sendMsg = "hello孟梁,你在测试MQ " + new Date();
        System.out.println("Sender1 : " + sendMsg);
        rabbitTemplate.convertAndSend(HomepageServerApplication.HELLO, sendMsg); // 4
    }

}
